<?php
namespace app\admin\model;

use think\Model;
use think\Db;

class Login extends Model
{
    public static function checkLogin($data = array())
    {
     	$info = Db::name('admin_user')->where($data)->find();
     	return $info;
    }

    public static function logout()
    {
    	//删除cookie
		//cookie(null, 'think_admin_');
    }

    public static function setCookie($data = array())
    {
        cookie('username', $data['username']);
        cookie('uid', $data['id']);
    }
}
